#ifndef _SRF04_H_
#define _SRF04_H_


namespace sonar
{

class srf04
{
public:

  srf04(void) : _pin_in(-1), _pin_out(-1) {}

  void setup(int pinIn, int pinOut);

  void loop(void);

  unsigned long get_measure(void) const
  { return _measure; }

private:

  unsigned long _measure;
  unsigned long _duration;
  int _pin_in, _pin_out;
};

} // sonar

#endif // _SRF04_H_
